import Mock from 'mockjs';
export default [
  {
    url: '/api/admin/login',
    method: 'post',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        data: {
          userid: 2,
          name: '马化腾',
          token: 'fewfjewklfjewkfjewklewlfjwef',
          avatar: Mock.Random.image('200x200', '#50B347', '#FFF', 'leader')
        }
      }
    }
  },
  //全部访问客人
  {
    url: '/api/admin/guest',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        total: 29,
        ...Mock.mock({
          'data|29': [{
            'id|+1': 1,
            name: '@cname',
            time: '@date',
            'statu|1': ['已失效', '待访问', '待审核']
          }]
        })
      }
    }
  },

  // {
  //   url: '/api/singin',
  //   method: 'get',
  //   response: () => {
  //     return {
  //       code: 0,
  //       msg: 'ok',
  //       total: 29,
  //       ...Mock.mock({
  //         'data|29': [{
  //           'id|+1': 1,
  //           name: Mock.mock('@cname'),
  //           isselect: true
  //         }]
  //       })
  //     }
  //   }},
  {
    url: '/api/admin/today',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        data: [
          {
            text1: '高三年级语文',
            text2: '第三节（10:00-10:50）',
            text3: '高中部403教室',
            text4: '授课中',
            avatar: Mock.Random.image('200x200', '#50B347', '#FFF', 'Mock Avatar'),
            user: '刘小牛'
          },
          {
            text1: '高二年级语文',
            text2: '第四节（11:10-12:00）',
            text3: '高中部404教室',
            text4: '课程准备',
          },
          {
            text1: '高一年级语文',
            text2: '第一节（8:00-8:50）',
            text3: '高中部402教室',
            text4: '课程结束（27/29）',
          }
        ]
      }
    }
  },
  {
    url: '/api/count/list',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        total: 29,
        ...Mock.mock({
          'data|1': [{
            "count|1-1000000.1-2": 1,
            year: '@datetime("yyyy   ")',
            month: '@datetime(" MM ")'
          }]
        })
      }
    }
  },

  {
    url: '/api/admin/all',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        data: [
          {
            id: 1,
            3: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            7: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 2,
            3: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            4: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 3,
            1: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            4: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 4,
            2: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            3: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 5,
            5: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            6: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 6,
            2: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            6: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          },
          {
            id: 7,
            3: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            },
            5: {
              "subject|1": ['语文', '历史', '数学'],
              "classroom|1": ['A401', 'A502', 'B234']
            }
          }
        ]
      }
    }
  },
  {
    url: '/api/singin',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        total: 29,
        ...Mock.mock({
          'data|29': [{
            'id|+1': 1,
            name: Mock.mock('@cname'),
            isselect: true
          }]
        })
      }
    }
  },
  {
    url: '/api/kecheng',
    method: 'get',
    response: () => {
      return {
        code: 0,
        msg: 'ok',
        teacher: {
          text1: '高三年级语文',
          text2: '第三节（10:00-10:50）',
          text3: '高中部403教室',
          avatar: Mock.Random.image('200x200', '#50B347', '#FFF', 'Mock Avatar'),
          user: '刘小牛'
        },
        ...Mock.mock({
          'data|29': [{
            'id|+1': 1,
            name: Mock.mock('@cname')
          }]
        })
      }
    }
  }
]